// import * as qiniu from 'qiniu-js'
import { QINIU_CONFIG } from './config'
export function getQiniuToken() {
    var accessKey = QINIU_CONFIG.accessKey
    var secretKey = QINIU_CONFIG.secretKey
    var mac = new window.qiniu.auth.digest.Mac(accessKey, secretKey)
    var options = {
        scope: QINIU_CONFIG.scope
    }
    var putPolicy = new window.qiniu.rs.PutPolicy(options)
    var uploadToken = putPolicy.uploadToken(mac)
    return uploadToken
}
